<?php
namespace app\index\model;//命名空间
use think\Model; //引入模型类
//模型
class Notice extends Model{
	
	public function add($data){		
	  return  $this->save($data);
	}
	public function getList(){
		$where=[
		'status'=>0
		];
		$order=[
			'sort'=>'asc',
			'create_time'=>'desc',
		];
		return $this->field('id,title,create_time')
					->limit(3)
					->where($where)
					->order($order)
		            ->paginate(5);
	}
}
